<template>
    <div style="width: 100px; height: 100px; background: red;" ref="el"></div>
    <OnClickOutside @trigger="close">
        <div style="width: 100px; height: 100px; background: blue;"></div>
    </OnClickOutside>



</template>
<script setup lang="ts">
import { ref } from 'vue'
import { onClickOutside } from '@vueuse/core'
import { OnClickOutside } from '@vueuse/components'
const el = ref(null)

onClickOutside(el, close)

function close() {
    console.log("外面")
}


</script>